#!/bin/bash

# for fedora

sudo dnf install java-17-openjdk java-17-openjdk-devel -y
java -version
javac -version

# 查找 OpenJDK 安装路径
sudo update-alternatives --config java

# 添加以下行（路径根据实际调整）
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk/bin/java
export PATH=$JAVA_HOME/bin:$PATH

# 安装 Maven
# sudo dnf install maven -y
# or sudo dnf install gradle -y
